let arr = [1,2,3]


// let [num1,num2,num3] = arr;

//A rest element must be last in a destructuring pattern.
// let [ ...other , num1  ,] = arr;

//数组的结构
let [ num1  , ...other] = arr;

//对象的结构
let  user =  { name: '张三', age: 18, address: { province: 'HLJ', city: 'HRB' } }

// let name = user.name
// let age = user.age
// let adddress = user.adddress

let {name ,age, address:{province}} = user
console.log("name, ",name);
console.log("age, ",age);
console.log("province, ",province);




let  info = "hello";
let infos = [ ...info     ]
console.log("infos, ",infos);



//类数组（可迭代  有 lenght  可以遍历  实现了迭代器）
const lis = document.querySelectorAll('li');
console.log("lis",lis);

let liEls = [...lis ]
console.log("liEls",liEls);


let  array = [1,2,3,4,5]
//array 实现迭代器  数组默认实现了迭代器
// for(let num of array){
// }




















